package com.iteye.trafficRecorder;

import android.content.Context;
import android.os.Build;
import android.telephony.TelephonyManager;

public class DeviceInfo {
	
	private TelephonyManager telephonyManager;
	
	public DeviceInfo(Context context) {
		telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
	}
	
	/**
	 * 返回手机号码
	 * @return
	 */
	public String getPhoneNumber() {
		String nativePhoneNumber = telephonyManager.getLine1Number();
		return nativePhoneNumber;
	}
	
	/**
	 * 返回设备型号
	 * @return
	 */
	public String getDeviceType() {
		return Build.MODEL;
	}

}
